package main

import (
	"fmt"
	"math"
)

func pseudoEncrypt(val int32) int32 {
	var l1 int32 = (val >> 16) & 0xffff //取出二进制的左边16位
	var r1 int32 = val & 0xffff //取出二进制的右边16位
	var l2, r2 int32
	var i int

	for i = 0; i < 3; i++ {
		l2 = r1
		r2 = l1 ^ int32(math.Round(float64((1366*r1+150889)%714025)/714025.0*32767))
		l1 = l2
		r1 = r2
	}

	return ((r1 << 16) + l1)
}




func main() {
	fmt.Println(pseudoEncrypt(4))
}
